-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toggle 'complete track name' display on double click in otioview #690
Toggle 'complete track name' display on double click in otioview #690
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two really small notes. This looks like a nice feature, thanks!
track_name = track_name[:7] + '...' | ||
self.source_name_label.setText(track_name + '\n({})'.format(track.kind)) | ||
self.track = track | ||
self.track_name = 'Track' if track.name == '' else track.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.track_name = 'Track' if track.name == '' else track.name | |
self.track_name = 'Track' if not track.name else track.name |
Should be the same but also covers the case where track.name
is None
self.track = track | ||
self.track_name = 'Track' if track.name == '' else track.name | ||
self.full_track_name = self.track_name | ||
if len(self.track_name) > 7: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets break the 7 out to be a top level constant, maybe SHORT_NAME_LENGTH
Codecov Report
@@ Coverage Diff @@
## master #690 +/- ##
==========================================
+ Coverage 81.70% 81.72% +0.02%
==========================================
Files 72 72
Lines 2728 2731 +3
==========================================
+ Hits 2229 2232 +3
Misses 499 499
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
@ssteinbach as per your suggestion to have an option to view long track names in otioview, I've added an option to do that on double-clicking on the TrackName widget.
This is how it looks: